<script type="text/javascript" src="/javascripts/qrcode.js"></script>
<div id='container' style='width:1100px; margin:-20px auto;'>
<br style='clear:both;'>&nbsp;</br>
<div style='float:left;'>
  <img alt="Cer_tl" src="/images/cer_tl.gif" />
</div>
<div style='float:right'>
  <img alt="Cer_tr" src="/images/cer_tr.gif" />
</div>
<div id='exam_result' style='margin:auto; padding-top:0;line-height:80%;'>
  <p>&nbsp;</p>
  <img alt="Opm" height="150" src="/images/opm.jpg" width="150" />
  <%if certificate.c_status=='A'%>
  <h1>Certificate of Completion</h1>
  <%else%>
  <h1><font color="red">Certificate นี้ถูกเพิกถอนแล้ว</font></h1>
  <%end%>
  <p>&nbsp;</p>
  <br />
  <h1><i><%=certificate.registration.user.full_name%> (<%=certificate.registration.user.e_full_name%>)</i></h1>
  <p>&nbsp;</p>
  <h1>has successfully completed Professional Standard Assessment System for Sports : PASS</h1>
  <br />
  <h1><i><%=certificate.registration.syllabus_opening.syllabus.e_name%></i></h1>
  <br />
  <br />
  <br />
  <br />
  <h2>Given at Bangkok, Thailand,  <%=Date.today.strftime("%d %B %Y")%>.</h2>
</div>
<div id='foot' style='position:relative; margin-top:-30px;'>
  <div style='float:left'><img alt="Cer_bl" src="/images/cer_bl.gif?" /></div>
  <div style='float:right'><img alt="Cer_br" src="/images/cer_br.gif?" /></div>
  <div style='padding-top:40px; text-align:right; font-size: 10pt;'>
    <div style='float:right' id="qrcode_<%=certificate.id%>"></div><br/><br/><br/>รหัสอ้างอิง <%=certificate.ref_code%>  &nbsp;&nbsp;
    <script type="text/javascript">
          var qrcode = new QRCode("qrcode_<%=certificate.id%>", {
          text: "<%=request.host%>/syllabus/print_certificate?ref_code=<%=certificate.ref_code%>",
          width: 100,
          height: 100,
          colorDark : "#000000",
          colorLight : "#ffffff",
          correctLevel : QRCode.CorrectLevel.H
      });
    </script>
  </div>
</div>
</div>